#@layout()
#define main()
<div class="container">
    #for(type:list)
    <div class="row" style="height:15px;">
        <h4>#(type.desc):</h4>
    </div>
    <div class="row" style="height:15px;">
    </div>
    <div class="row">
    #for(pub:type.apps)
        #if((for.index+1)>4 && (for.index+1)%6==1)
    </div>
    <div class="row" style="height:15px;">
    </div>
    <div class="row">
        #end
        <div class="col-2 text-center text-white" style="height:175px;">
            <div class="border border-secondary rounded justify-content-center" style="height:160px;display:flex;align-items:center;">
                #if(pub.redirectUrl !='')
                <a href="#(pub.redirectUrl)" target="_blank">
                #end
                    #if(pub.logo!='')
                    <img src="#(pub.logo)" style="max-height: 100%" class="img-fluid" #if(pub.redirectUrl =='')onclick="popup(this.src)" #end
                         onmouseover="this.style.cursor='pointer';this.style.cursor='hand'" onmouseout="this.style.cursor='default'"/>
                    #else
                    <h1>
                        <span class="badge badge-secondary" style="white-space: unset">#(pub.name)</span>
                    </h1>
                    #end
                #if(pub.redirectUrl !='')
                </a>
                #end
            </div>
            #if(pub.logo!='')
            <div class="text-center" style="height: 20px">
                <span class="badge badge-secondary">#(pub.name)</span>
            </div>
            #end
        </div>
    #end
    </div>
    #end
    <div class="modal fade" id="ShowImage_Form" tabindex="-1" role="dialog" aria-labelledby="exampleModalCenterTitle" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered" role="document">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title" id="exampleModalLongTitle">图片</h5>
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                    </button>
                </div>
                <div id="img_show" class="modal-body text-center">
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
                </div>
            </div>
        </div>
    </div>
</div>
#end
#define script()
<script>
    $(function(){
        var ss = "#(result)";
        if(ss !== ''){
            alert(ss);
        }
    });

    function popup(source){
        $("#ShowImage_Form").find("#img_show").html("<image src='"+source+"' class='img-fluid' />");
        $("#ShowImage_Form").modal();
    }
</script>
#end